using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LightHitController : MonoBehaviour
{
    private PlayerStat playerStat;
    public virtual void Start()
    {
        playerStat = PlayerManager.Instance.player.GetComponent<PlayerStat>();
    }
    public virtual void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.GetComponent<Enemy>() != null)
        {
            EnemyStat enemyStat = collision.GetComponent<EnemyStat>();
            playerStat.DoMagicalDamage(enemyStat);
        }
    }
}
